<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>用户中心</title>
		<link rel="stylesheet" href="css/_all-skins.min.css" />
		<link rel="stylesheet" href="css/AdminLTE.min.css" />
		<link rel="stylesheet" href="css/bootstrap.min.css" />
		<link rel="stylesheet" href="css/font-awesome.min.css" />
		<link rel="stylesheet" href="css/daterangepicker.css" />
		<link rel="stylesheet" href="css/select2.min.css" />	
		<link rel="stylesheet" type="text/css" href=" css/layer.css"/>
		<link rel="stylesheet" href="css/layui.css" />
	</head>
	<style>
		.search_btn1{
		background: white;
		border-radius: 5px 5px;
		border: solid 1px #B8C7CE;
		width: 80px;
		height:32px;
		color: gray;
		vertical-align: bottom;
		margin-top: 10px;
		
		}
		.search_box{
			width: 260px;
			margin-top: 10px;
			position: relative;
			width:100%;
			display: inline-block;
		}
		.search_title{
			display:inline-block;
			width:100px;
			font-weight: bold;
			font-size: 16px;
			vertical-align: top;
		}
		.product_kind select{
			width: 260px;
		}
		.list_content{
			width: 100%;
		}
		.list_content thead th{
			font-weight: normal;
			background: #3c8dbc;
			color: white;
			height: 30px;
			text-align: center;
			font-size: 13px;
		}
		 td{
		 	text-align: center;
		 	font-size: 13px;
		 	height: 35px;
		 }
		 td label{
		 	font-weight: normal;
		 	font-size: 10px;
		 }
		 td div input{
		 	font-size: 10px;
		 }
		 tbody{
		 	background: white;
		 }
		 tbody tr{
		 	border: solid 2px #ecf0f5;
		 }
		 td div{
		 	height: 22px;
		 	width: 130px;
		 }
		  td .btn_done{
		  	width: 100%;
		  }
		 td .btn_done a{
		 	display: inline-block;
		 	width:46%;
		 	text-decoration: underline;
		 	text-align: center;
		 }
		 
		 td a{
		 	color: #3c8dbc;
		 	font-size: 12px;
		 }
		 .bg1{
		 	text-align: center;
		 }
		 td div label{
		 	margin-right: 10px;
		 }
		 .label1{
		 	color:green;
		 }
		 .label2{
		 	color: deeppink;
		 }
		 .label3{
		 	color: #007DDB;
		 }
		 .select2-container .select2-selection--single{
		 	height: 33px;
		border: solid 1px #B8C7CE;
		 }
		 .form-control{
		 	width: 170px;
		 	display: inline-block;
		 }
		 .date_pick{
		 	width: 220px!important;
		 	display: inline-block;
		 	margin-top: 5px;
		 }
		 .table_content{
		 	min-height: 400px;
		 	background: white;
		 	padding: 0;
		 	margin-top: 10px;
		 }
		 .input_group{
		 	margin-top:20px;
		 }
		    .select2-search__field{
		 	display: none;
		 }
		 .select2-results__option--highlighted[aria-selected]{
		 	background:#3c8dbc!important ;
		 }
		  .clear_date{
			height: 34px;
			width: 25px;
			margin-left: -25px;
			border: none;
			background: none;
			position: relative;
			z-index: 999;
		}
	</style>
	<body class="hold-transition skin-blue sidebar-mini fixed">
<div class="wrapper">

    <header class="main-header">
    <!-- Logo -->
    <a href="index2.html" class="logo">
      <!-- mini logo for sidebar mini 50x50 pixels -->
   
      <!-- logo for regular state and mobile devices -->
      <span class="logo-lg"><b>衣当先</b>CRM</span>
    </a>
    <!-- Header Navbar: style can be found in header.less -->
    <nav class="navbar navbar-static-top">
      <!-- Sidebar toggle button-->
      <a href="#" class="sidebar-toggle" data-toggle="push-menu" role="button">
        <span class="sr-only">Toggle navigation</span>
      </a>

      <div class="navbar-custom-menu">
        <ul class="nav navbar-nav">
          <li class="dropdown user user-menu">
            <a href="#" class="dropdown-toggle" data-toggle="dropdown">
            	
              <img src="img/user2-160x160.jpg" class="user-image" alt="User Image">
              <span class="hidden-xs  manger-name">Amy</span>
               
            	 <span class="change_password" style="font-size: 12px;margin-left: 40px;">修改密码</span>
            	 <span class="exit_login" style="font-size: 12px;">退出登录</span>
            </a>
            
          </li>
        </ul>
      </div>
    </nav>
  </header>
  <!-- Left side column. contains the logo and sidebar -->
  <aside class="main-sidebar">
    <!-- sidebar: style can be found in sidebar.less -->
    <section class="sidebar">
      <!-- Sidebar user panel -->
      <div class="user-panel">
        <div class="pull-left image">
          <img src="img/user2-160x160.jpg" class="img-circle">
        </div>
        <div class="pull-left info">
          <p class="manger-name">Amy</p>
          <a href="#"><i class="fa fa-circle text-success"></i> 在线</a>
        </div>
      </div>
      <!-- search form -->
      <form action="#" method="get" class="sidebar-form">
        <div class="input-group">
          <input type="text" name="q" class="form-control" placeholder="Search...">
          <span class="input-group-btn">
                <button type="submit" name="search" id="search-btn" class="btn btn-flat"><i class="fa fa-search"></i>
                </button>
              </span>
        </div>
      </form>
      <!-- /.search form -->
      <!-- sidebar menu: : style can be found in sidebar.less -->
      <ul class="sidebar-menu" data-widget="tree">
        <li class="header">功能目录</li>
        
        <li class=" treeview">
          <a href="#">
            <i class="fa fa-dashboard"></i> <span>系统首页</span>
            <span class="pull-right-container">
              <i class="fa fa-angle-left pull-right"></i>
            </span>
          </a>
          <ul class="treeview-menu">
            <li class=""><a href="index.html"><i class="fa fa-circle-o"></i> 首页总览</a></li>
            <li><a href="login_log.html"><i class="fa fa-circle-o"></i> 登录日志</a></li>
              <li><a href="id_manager.html"><i class="fa fa-circle-o"></i> 账号管理</a></li>
          </ul>
        </li>
      
        <li class="treeview">
          <a href="#">
            <i class="fa fa-laptop"></i>
            <span>商品管理</span>
            <span class="pull-right-container">
              <i class="fa fa-angle-left pull-right"></i>
            </span>
          </a>
          <ul class="treeview-menu">
            <li><a href="product_list.html"><i class="fa fa-circle-o"></i> 商品列表</a></li>
            <li><a href="new_product.html"><i class="fa fa-circle-o"></i> 新增商品</a></li>
            <li><a href="product_kind.html"><i class="fa fa-circle-o"></i> 商品分类</a></li>
            <li><a href="product_confirm.html"><i class="fa fa-circle-o"></i> 商品审核</a></li>
             <li><a href="product_income.html"><i class="fa fa-circle-o"></i> 商品回收</a></li>
          </ul>
        </li>

        <li class="treeview">
          <a href="#">
            <i class="fa fa-edit"></i> <span>订单管理</span>
            <span class="pull-right-container">
              <i class="fa fa-angle-left pull-right"></i>
            </span>
          </a>
          <ul class="treeview-menu">
            <li><a href="hire_order.html"><i class="fa fa-circle-o"></i> 租赁订单</a></li>
            <li><a href="pay_order.html"><i class="fa fa-circle-o"></i> 支付订单</a></li>
            <li><a href="operate_log.html"><i class="fa fa-circle-o"></i> 订单日志</a></li>
          </ul>
        </li>          
        <li class="treeview active">
          <a href="#">
            <i class="fa fa-pie-chart"></i>
            <span>用户管理</span>
            <span class="pull-right-container">
              <i class="fa fa-angle-left pull-right"></i>
            </span>
          </a>
          <ul class="treeview-menu">
            <li class="active"><a href="user_list.html"><i class="fa fa-circle-o"></i> 用户列表</a></li>
            <li><a href="discounts.html"><i class="fa fa-circle-o"></i> 优惠卷中心</a></li>
          </ul>
        </li>
        <li class="treeview">
          <a href="#">
            <i class="fa fa-pie-chart"></i>
            <span>数据管理</span>
            <span class="pull-right-container">
              <i class="fa fa-angle-left pull-right"></i>
            </span>
          </a>
          <ul class="treeview-menu">
            <li><a href="all_data.html"><i class="fa fa-circle-o"></i> 数据日报</a></li>
            <li><a href="product_data.html"><i class="fa fa-circle-o"></i> 商品数据</a></li>
            <li><a href="order_data.html"><i class="fa fa-circle-o"></i> 订单数据</a></li>
            <li><a href="user_data.html"><i class="fa fa-circle-o"></i> 用户数据</a></li>
           <li><a href="income_data.html"><i class="fa fa-circle-o"></i> 收入数据</a></li>
          </ul>
        </li> 
        <li>
          <a href="advice.html">
            <i class="fa fa-files-o"></i> <span>反馈建议</span>
          </a>
        </li>
         <li>
          <a href="w_internet.html">
            <i class="fa fa-book"></i> <span>物联网订单</span>
          </a>
        </li>
      </ul>
    </section>
    <!-- /.sidebar -->
  </aside>

  <!-- Content Wrapper. Contains page content -->
  <div class="content-wrapper">
    

    <!-- Main content -->
           
    
    <section class="content" >
     
      <!-- Main row -->
      <div class="row">
        <!-- Left col -->
        <div class="col-lg-1"></div>
        <section class="col-lg-10 connectedSortable " >
        	<div style="padding: 0;">
	        	 <div class="search_box">
	        		<span class="search_title">条件筛选</span>
	        		<div style="display: inline-block;width:620px;">
	        			<input type="text" class="form-control hire_phone" placeholder="手机号"/>
	        		    <select class="select2 form-control hire_num" >
							<option value="0">未租赁过</option>
							<option value="1">租赁1次</option>
							<option value="2">租赁2次</option>
							<option value="3">3次以上</option>
					   </select>
	        		    <select class="select2 form-control hire_age" >
	        		    	<option value="0">全部</option>
							<option value="1">15-20</option>
							<option value="2">21-25</option>
							<option value="3">26-30</option>
							<option value="4">31-35</option>
							<option value="5">36-40</option>
							<option value="6">40以上</option>
					   </select><br />
					    <input type="text" placeholder="请输入时间范围" class="date_pick form-control " id="reservation" ><button class="clear_date">x</button>
	        		    
	        		</div>
	        		<div style="display: inline-block;width: 200px;">
	        			<input class="search_btn1" type="button" value="用户查询"/>
	        		</div>
	        	 </div>
	          
		          <div class="input_group ">
						 <span class="search_title">订单列表</span>
						<select class="select2 form-control hire_vip" style="width: 170px;">
							<option value="全部">全部</option>
							<option value="会员">会员</option>
							<option value="普通">普通</option>
					    </select>
				 </div>
			</div>
			
        </section>
   
      </div>
      <div class="row">
      	<div class="col-lg-1"></div>
      	<div class="col-lg-10 table_content">
      		<!--<h5 class="search_title" style="margin-top: 10px;">商品列表</h5>-->
      	    <table class="list_content">
      		    <thead>
      		    	<tr>
      		    		<th>编号</th>
      		    		<th>用户手机号</th>
      		    		<th>消费金额</th>
      		    		<th>注册时间</th>
      		    		<th>会员信息</th>
      		    		<th>用户标签</th>
      		    		<th>操作</th>
      		    	</tr>
      		    </thead>
      		    <tbody class="table_data">
      		    	<!--<tr>
      		    		<td><input type="checkbox" /></td>
      		    		<td> 1001</td>
      		    		<td>
      		    			1312233344
      		    		</td>
      		    		<td>
      		    			0
      		    		</td>
      		    		
      		    		<td>
      		    			2018-3-3 15:00:40
      		    		</td>
      		    		<td>
      		    			30天
      		    		</td>
      		    		<td>学生</td>
      		    		<td>
      		    			<div class="btn_done">
      		    				<a href="#">发卷</a>
      		    				<a href="#">查看</a>
      		    			</div>
      		    		</td>
      		    	</tr>-->
      		    	
      		    </tbody>
      	    </table>
      	</div>
      	 <div class="row col-lg-12" style="text-align: center;margin-top: 10px;">
      		<div class="col-lg-1"></div>
      		<div id="demo7" class="col-lg-10" style="padding: 0;"></div>
      	</div>
      </div>
      
    </section>
    <!-- /.content -->
  </div>
   
  <!-- /.content-wrapper -->
  <footer class="main-footer">
    <div class="pull-right hidden-xs">
      <b>Version</b> 2.0.0
    </div>
    <strong>Copyright &copy; 2017-2018 西安寒武纪信息科技有限公司.</strong> All rights
    reserved.
  </footer>
</div>
<script src="js/jquery.min.js"></script>



<script src="js/adminlte.min.js"></script>
<script type="text/javascript" src="js/moment.min.js" ></script>
<script src="js/daterangepicker.js"></script>
<script type="text/javascript" src="js/select2.full.min.js" ></script>
<script src="js/layui.all.js"></script>
<script type="text/javascript" src="js/jq.cookie.js" ></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/change_password.js"></script>
<script>
	  $('.select2').select2();
	  $('#reservation').daterangepicker({
	  	locale:{format:'YYYY-MM-DD'}
	  });
	  $('#reservation').val('请选择时间');
	 getData1(1);
	 $('.search_btn1').click(function(){
	 	getData1(1);
	 })
	 $('.hire_vip').change(function(){
	 	getData1(1);
	 })
	 	function pageDivd(curr,page_num){
	 	    	layui.use(['laypage', 'layer'], function(){
				  var laypage = layui.laypage
				  ,layer = layui.layer;
				    laypage.render({
				    elem: 'demo7'
				    ,count: page_num
				    ,limit:20
				    ,curr:curr
				    ,jump: function(obj,first){
				    	if(!first){
				    			getData1(obj.curr);
				    		
				    	}
				    }
				  });
				})
	 	    }
	 	
	 	function getData1(curr){
	 	          var data_rang = $('#reservation').val();//时间范围
				  var evKind = $('.event_kind').select2('val');
				  var start = data_rang.split(' -')[0];
				  var end = data_rang.split('- ')[1];
				  var timeOnoff = "False";
				  if(data_rang!=''&&data_rang!='请选择时间'){
				  	timeOnoff = "True"
				  }
				  $.ajax({
				  	type:"get",
				  	url:"https://www.retux.cn/MgUserManage",
				  	async:true,
				  	data:{
				  		page:curr ,
				  		row: 20,
				  		Phone:$('.hire_phone').val(),
				  		Sales:$('.hire_num').select2('val'),
				  		Age:$('.hire_age').select2('val'),
				  		end:end ,
				  		Role:$('.hire_vip').select2('val'),
				  		start:start ,
				  		Time:timeOnoff
				  	},
				  	success:function(data){
				  		if(data[0].length==0){
				  			layer.msg('暂无数据');
				  		}
				  		TableView(data[0]);
				  		pageDivd(curr,data[1]);
				  	}
				  });
			}
	 	
	 		 function TableView(data){
	 	    	$('.table_data').html('');
	 	    	
	 	    	for (var i=0;i<data.length;i++) {
	 	    	
	 	    		
	 	    		var trText = `<tr>
		      		    		<td>${data[i][0]}</td>
		      		    		<td>${data[i][1]}</td>
		      		    		<td>
		      		    			${data[i][2]}
		      		    		</td>
		      		    		<td>
		      		    			${data[i][3]}
		      		    		</td>
		      		    		<td>
		      		    			${data[i][4]}
		      		    		</td>
		      		    		<td>
		      		    			${data[i][5]}
		      		    		</td>
		      		    		<td>
		      		    			<div class="btn_done"> 
		      		    				<a class="qu_send" num="${data[i][0]}" href="#">发卷</a>
		      		    				<a class="look_user" num="${data[i][0]}" href="#">查看</a>
		      		    			</div>
		      		    		</td>
		      		    	</tr>
		      		    	`;
		      		    	
		      		 $('.table_data').append(trText) ;  	
		      		    	
	 	    	}
	 	    	
	 	    	operateFn();
	 	    }
	 	function operateFn(){
	 		$('.look_user').click(function(){
	 			var Index = $(this).attr('num');
	  		   window.location.href="http://119.23.212.200:30000/user_detail.html?num="+Index;
	  		
	 		})
	 		$('.qu_send').click(function(){
	 			var Index = $(this).attr('num');
	  		   layer.open({
							type: 2,
							title:false,
							closeBtn: 1,
							area: ['650px', '300px'],
							shade: 0.8,
							shadeClose:true,
							anim:1,
							id: 'LAY_layuipro',
							btnAlign: 'c',
							moveType: 1,
							content: "http://119.23.212.200:30000/qu_send.html?num="+Index+"&Kind=1",
							success: function() {
					
							}
					
						})
	  		
	 		})
	 	}
</script>
</body>
</html>
